<%--
  ~ Copyright 2009-2015 by WWW.KNET.CN  All rights reserved.
  --%>
<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ attribute name="id" type="java.lang.String" required="false" description="html属性id"%>
<%@ attribute name="name" type="java.lang.String" required="false" description="html属性name"%>
<%@ attribute name="withAll" type="java.lang.String" required="false" description="是否包含全部按钮"%>
<%@ attribute name="allName" type="java.lang.String" required="false" description="all按钮返回为空的名称"%>
<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式"%>
<%@ attribute name="cssStyle" type="java.lang.String" required="false" description="css样式"%>
<%@ attribute name="defaultValue" type="java.lang.String" required="false" description="默认选择的值"%>
<c:if test="${empty id}">
    <c:set var="id" value="customerFeature"/>
</c:if>
<c:if test="${empty name}">
    <c:set var="name" value="customerFeature"/>
</c:if>
<c:if test="${empty cssClass}">
    <c:set var="cssClass" value="select2"/>
</c:if>
<c:if test="${empty allName}">
    <c:set var="allName" value="全部"/>
</c:if>


<select id="${id}" name="${name}" style="${cssStyle}" class="${cssClass}">
    <c:if test="${withAll eq 'true'}">
        <option value="">${allName}</option>
    </c:if>
    <c:forEach items="${fns:listCustomerFeature()}" var="item">
        <option <c:if test="${item.id eq defaultValue}">selected="selected"</c:if> value="${item.id}">${item.name}</option>
    </c:forEach>
</select>